package Service.impl;

import Dao.BookDao;
import Service.BookService;
import org.springframework.beans.factory.DisposableBean;
import org.springframework.beans.factory.InitializingBean;

import javax.naming.spi.InitialContextFactory;

public class BookServiceImpl implements BookService, InitializingBean, DisposableBean {
    private BookDao bookDao;

    public void setBookDao(BookDao bookDao) {
        this.bookDao = bookDao;
    }

    public void save() {
        System.out.println("book xml改纯注解.service save ...");
        bookDao.save();
    }

    @Override
    public void destroy() throws Exception {
        System.out.println("xml改纯注解.service destroy");
    }

    @Override
    public void afterPropertiesSet() throws Exception {
        System.out.println("xml改纯注解.service init");
    }
}
